﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.guide.actions {

    public class GARemoveElements extends GuideAction {

        protected var m_removeDialogs:Boolean = false;
        protected var m_removeMasks:Boolean = false;
        protected var m_removeArrows:Boolean = false;
        protected var m_removeModes:Boolean = false;
        protected var m_removeGuideTiles:Boolean = false;

        override public function createFromXml(_arg1:XML):Boolean{
            var _local2:XMLList = checkAndGetElement(_arg1, "remove");
            if (!_local2){
                return (false);
            };
            if (String(_local2.@dialogs) == "true"){
                this.m_removeDialogs = true;
            };
            if (String(_local2.@masks) == "true"){
                this.m_removeMasks = true;
            };
            if (String(_local2.@arrows) == "true"){
                this.m_removeArrows = true;
            };
            if (String(_local2.@modes) == "true"){
                this.m_removeModes = true;
            };
            if (String(_local2.@guidetiles) == "true"){
                this.m_removeGuideTiles = true;
            };
            return (true);
        }
        override public function update(_arg1:Number):void{
            super.update(_arg1);
            if (this.m_removeDialogs){
                m_guide.removeDialogs();
            };
            if (this.m_removeMasks){
                m_guide.removeMask();
            };
            if (this.m_removeArrows){
                m_guide.removeArrows();
            };
            if (this.m_removeModes){
                Global.world.setDefaultGameMode();
            };
            if (this.m_removeGuideTiles){
                m_guide.removeGuideTiles();
            };
            removeState(this);
        }

    }
}//package Modules.guide.actions 
